package rad.framework.mda.generator.template.main.java.seam;

import java.util.*;
import org.eclipse.uml2.uml.*;
import rad.framework.mda.generator.util.*;
import org.eclipse.emf.codegen.util.*;

public class FinderBean
{
  protected static String nl;
  public static synchronized FinderBean create(String lineSeparator)
  {
    nl = lineSeparator;
    FinderBean result = new FinderBean();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "";
  protected final String TEXT_2 = "/*" + NL + " * ============================================================================" + NL + " *                   GNU Lesser General Public License" + NL + " * ============================================================================" + NL + " */" + NL + "package ";
  protected final String TEXT_3 = ".editor;";
  protected final String TEXT_4 = NL + NL + "/**" + NL + " * The implementation of the Finder interface." + NL + " *" + NL + " * @author ";
  protected final String TEXT_5 = NL + " * @generated" + NL + " */" + NL + "@Name(\"";
  protected final String TEXT_6 = "Finder\")" + NL + "@Stateful" + NL + "@Scope(ScopeType.SESSION)" + NL + "public class ";
  protected final String TEXT_7 = "FinderBean extends AbstractFinderBean< ";
  protected final String TEXT_8 = " > implements ";
  protected final String TEXT_9 = "Finder {" + NL + "" + NL + "\t/** @generated */" + NL + "\tprivate static final long serialVersionUID = 1L;" + NL + "\t" + NL + "\t/** @generated */" + NL + "\tpublic ";
  protected final String TEXT_10 = "FinderBean() {";
  protected final String TEXT_11 = NL + "\t\tinitOrderBy(\"name\", false);";
  protected final String TEXT_12 = NL + "\t\tinitOrderBy(\"code\", false);";
  protected final String TEXT_13 = NL + "\t}" + NL + "" + NL + "\t/** @generated */" + NL + "\tprotected void initFilter(Filter filter) {";
  protected final String TEXT_14 = NL + "\t\tfilter.addStringParameter(\"";
  protected final String TEXT_15 = "\");";
  protected final String TEXT_16 = NL + "\t\tfilter.addBooleanParameter(\"";
  protected final String TEXT_17 = "\");";
  protected final String TEXT_18 = NL + "\t\tfilter.addDateParameter(\"";
  protected final String TEXT_19 = "\");";
  protected final String TEXT_20 = NL + "\t\tfilter.addNumberParameter(\"";
  protected final String TEXT_21 = "\");";
  protected final String TEXT_22 = NL + "\t\tfilter.addEnumParameter(\"";
  protected final String TEXT_23 = "\", ";
  protected final String TEXT_24 = ".class);";
  protected final String TEXT_25 = NL + "\t\t//filter.addStringParameter(\"";
  protected final String TEXT_26 = ".";
  protected final String TEXT_27 = "\");";
  protected final String TEXT_28 = NL + "\t\t//filter.addBooleanParameter(\"";
  protected final String TEXT_29 = ".";
  protected final String TEXT_30 = "\");";
  protected final String TEXT_31 = NL + "\t\t//filter.addDateParameter(\"";
  protected final String TEXT_32 = ".";
  protected final String TEXT_33 = "\");";
  protected final String TEXT_34 = NL + "\t\t//filter.addNumberParameter(\"";
  protected final String TEXT_35 = ".";
  protected final String TEXT_36 = "\");";
  protected final String TEXT_37 = NL + "\t\t//filter.addEnumParameter(\"";
  protected final String TEXT_38 = ".";
  protected final String TEXT_39 = "\", ";
  protected final String TEXT_40 = ".class);";
  protected final String TEXT_41 = NL + "\t\tfilter.addM2mParameter(\"";
  protected final String TEXT_42 = ".";
  protected final String TEXT_43 = "\", \"";
  protected final String TEXT_44 = "\", \"select id, ";
  protected final String TEXT_45 = " from ";
  protected final String TEXT_46 = " order by ";
  protected final String TEXT_47 = "\");";
  protected final String TEXT_48 = NL + "\t\tfilter.addM2oParameter(\"";
  protected final String TEXT_49 = "\", \"";
  protected final String TEXT_50 = "\", \"select id, ";
  protected final String TEXT_51 = " from ";
  protected final String TEXT_52 = " order by ";
  protected final String TEXT_53 = "\");";
  protected final String TEXT_54 = NL + "\t}" + NL + "\t" + NL + "\t/** @generated */" + NL + "\tprotected void initColumns() {";
  protected final String TEXT_55 = NL + "\t\t// addColumn(\"";
  protected final String TEXT_56 = "\", \"";
  protected final String TEXT_57 = "\", true);";
  protected final String TEXT_58 = NL + "\t\taddColumn(\"";
  protected final String TEXT_59 = "\", \"";
  protected final String TEXT_60 = "\", null);";
  protected final String TEXT_61 = NL;
  protected final String TEXT_62 = NL + "\t\taddColumn(\"";
  protected final String TEXT_63 = ".";
  protected final String TEXT_64 = "\", \"";
  protected final String TEXT_65 = "\", \"";
  protected final String TEXT_66 = "\", null);";
  protected final String TEXT_67 = NL + "\t\taddColumn(\"";
  protected final String TEXT_68 = ".";
  protected final String TEXT_69 = ".";
  protected final String TEXT_70 = "\", \"";
  protected final String TEXT_71 = "\", \"";
  protected final String TEXT_72 = "\", null);";
  protected final String TEXT_73 = NL + "\t}" + NL + "" + NL + "\t/** @generated */" + NL + "\tpublic boolean isSimpleEntity() {";
  protected final String TEXT_74 = NL + "\t\treturn false;";
  protected final String TEXT_75 = NL + "\t\treturn true;";
  protected final String TEXT_76 = NL + "\t}" + NL;
  protected final String TEXT_77 = NL + "\t/** @generated */" + NL + "\tpublic boolean isRenderView() {" + NL + "\t\treturn false;" + NL + "\t}";
  protected final String TEXT_78 = NL + NL + "\t/** @generated */" + NL + "\tpublic PieChart get";
  protected final String TEXT_79 = "PieChart() {" + NL + "\t\treturn new PieChart(getEntityManager(), \"";
  protected final String TEXT_80 = "\", \"";
  protected final String TEXT_81 = "\");" + NL + "\t}";
  protected final String TEXT_82 = NL + NL + "\t/** @generated */" + NL + "\tpublic PieChart get";
  protected final String TEXT_83 = "PieChart() {";
  protected final String TEXT_84 = "\t" + NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_85 = NL + "\t\treturn new PieChart(getEntityManager(), \"";
  protected final String TEXT_86 = "\", \"";
  protected final String TEXT_87 = ".name\");" + NL + "\t}";
  protected final String TEXT_88 = NL + NL + "\t/** @generated */" + NL + "\tpublic boolean isRenderCharts() {" + NL + "\t\treturn false;" + NL + "\t}";
  protected final String TEXT_89 = NL + NL + "\t/**" + NL + "\t * ------------------------------------------------------------------------" + NL + "\t * --- Base ComboBox" + NL + "\t * ------------------------------------------------------------------------" + NL + "\t *" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class ";
  protected final String TEXT_90 = "ComboBox<COMP, SRC> extends ComboBox<COMP, ";
  protected final String TEXT_91 = ", SRC> {" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tpublic ";
  protected final String TEXT_92 = "ComboBox(Object component, String name) {" + NL + "\t\t\tsuper(component, name);" + NL + "\t\t}" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tpublic ";
  protected final String TEXT_93 = "ComboBox(Object component, String instanceName, String name) {" + NL + "\t\t\tsuper(component, instanceName, name);" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected Class getEntityClass() {" + NL + "\t\t\treturn ";
  protected final String TEXT_94 = ".class;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getAlias() {" + NL + "\t\t\treturn \"t1\";" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getItemLabel() {";
  protected final String TEXT_95 = NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_96 = NL + "\t\t\treturn \"#{t1.name}\";" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getOrderBy() {";
  protected final String TEXT_97 = NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_98 = NL + "\t\t\treturn \"t1.name\";" + NL + "\t\t}" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * ------------------------------------------------------------------------" + NL + "\t * --- Base Picker" + NL + "\t * ------------------------------------------------------------------------" + NL + "\t *" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class ";
  protected final String TEXT_99 = "Picker<COMP, SRC> extends" + NL + "\t\tPicker<COMP, ";
  protected final String TEXT_100 = ", SRC> {" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tpublic ";
  protected final String TEXT_101 = "Picker(Object component, String name) {" + NL + "\t\t\tsuper(component, name);" + NL + "\t\t}" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tpublic ";
  protected final String TEXT_102 = "Picker(Object component, String instanceName, String name) {" + NL + "\t\t\tsuper(component, instanceName, name);" + NL + "\t\t}" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tprotected Class getEntityClass() {" + NL + "\t\t\treturn ";
  protected final String TEXT_103 = ".class;" + NL + "\t\t}" + NL + "" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getAlias() {" + NL + "\t\t\treturn \"t1\";" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getItemLabel() {";
  protected final String TEXT_104 = NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_105 = NL + "\t\t\treturn \"#{t1.name}\";" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getOrderBy() {";
  protected final String TEXT_106 = NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_107 = NL + "\t\t\treturn \"t1.name\";" + NL + "\t\t}" + NL + "\t" + NL + "\t\t/** @generated */" + NL + "\t\tprotected String getFilterRestriction() {";
  protected final String TEXT_108 = NL + "\t\t// TODO change the 'name' property as appropriate";
  protected final String TEXT_109 = NL + "\t\t\treturn \"lower(t1.name) like :filter\";" + NL + "\t\t}" + NL + "\t}" + NL + "}";
  protected final String TEXT_110 = NL;

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    

    org.eclipse.uml2.uml.Class uml2Class = (org.eclipse.uml2.uml.Class) argument;org.eclipse.uml2.uml.Package uml2Package = uml2Class.getPackage();
    stringBuffer.append(TEXT_1);
    stringBuffer.append(TEXT_2);
    stringBuffer.append(NameHelper.getQualifiedName(uml2Package));
    stringBuffer.append(TEXT_3);
    ImportManager importManager = ImportHelper.makeImportManager("");
    ImportHelper.addImport(uml2Class);
    importManager.addImport("java.util.List");
    importManager.addImport("javax.ejb.Stateful");
    importManager.addImport("org.jboss.seam.ScopeType");
    importManager.addImport("org.jboss.seam.annotations.Name");
    importManager.addImport("org.jboss.seam.annotations.Scope");
    importManager.addImport("rad.framework.seam.AbstractFinderBean");
    importManager.addImport("rad.framework.seam.ComboBox");
    importManager.addImport("rad.framework.seam.Filter");
    importManager.addImport("rad.framework.richfaces.Picker");
    
StringBuffer importStringBuffer = stringBuffer;
int importInsertionPoint = stringBuffer.length();
importManager.addCompilationUnitImports(stringBuffer.toString());

    stringBuffer.append(TEXT_4);
    stringBuffer.append(System.getProperty("user.name"));
    stringBuffer.append(TEXT_5);
    stringBuffer.append(NameHelper.getUncapName(uml2Class));
    stringBuffer.append(TEXT_6);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_7);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_8);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_9);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_10);
    if (ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_11);
    } else if (ClassHelper.hasPropertyNamed(uml2Class, "code")) {
    stringBuffer.append(TEXT_12);
    }
    stringBuffer.append(TEXT_13);
    for (Iterator<Property> i=ClassHelper.getAllSimpleProperties(uml2Class); i.hasNext();) { Property property = i.next();
    if (TypeHelper.isStringType(property.getType()) || TypeHelper.isText(property)) {
    stringBuffer.append(TEXT_14);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_15);
     } else if (TypeHelper.isBooleanType(property.getType())) {
    stringBuffer.append(TEXT_16);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_17);
     } else if (TypeHelper.isDate(property) || TypeHelper.isTimestamp(property)) {
    stringBuffer.append(TEXT_18);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_19);
     } else if (TypeHelper.isDecimal(property) || TypeHelper.isCurrency(property) || TypeHelper.isInteger(property)) {
    stringBuffer.append(TEXT_20);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_21);
    }}
    for (Iterator<Property> i=EnumerationHelper.getAllEnumerations(uml2Class); i.hasNext();) { Property property = i.next();
    stringBuffer.append(TEXT_22);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_23);
    stringBuffer.append(NameHelper.getCapName(property.getType()));
    stringBuffer.append(TEXT_24);
    }
    for (Iterator<Property> i=ClassHelper.getCompositeProperties(uml2Class); i.hasNext();) { Property property = i.next();
    for (Iterator<Property> j=ClassHelper.getAllSimpleProperties((org.eclipse.uml2.uml.Class)property.getType()); j.hasNext();) { Property property2 = j.next();
    if (TypeHelper.isStringType(property2.getType())) {
    stringBuffer.append(TEXT_25);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_26);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_27);
     } else if (TypeHelper.isBooleanType(property2.getType())) {
    stringBuffer.append(TEXT_28);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_29);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_30);
     } else if (TypeHelper.isDate(property2) || TypeHelper.isTimestamp(property2)) {
    stringBuffer.append(TEXT_31);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_32);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_33);
     } else if (TypeHelper.isDecimal(property2) || TypeHelper.isCurrency(property2) || TypeHelper.isInteger(property2)) {
    stringBuffer.append(TEXT_34);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_35);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_36);
    }}
    for (Iterator<Property> j=EnumerationHelper.getAllEnumerations((org.eclipse.uml2.uml.Class)property.getType()); j.hasNext();) { Property property2 = j.next();
    stringBuffer.append(TEXT_37);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_38);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_39);
    stringBuffer.append(NameHelper.getCapName(property2.getType()));
    stringBuffer.append(TEXT_40);
    }
    for (Iterator<Property> j=ClassHelper.getAllManyToManyProperties((org.eclipse.uml2.uml.Class)property.getType()); j.hasNext();) { Property property2 = j.next();
    for (Iterator<Property> k=ClassHelper.getAllSimpleProperties((org.eclipse.uml2.uml.Class)property2.getType()); k.hasNext();) { Property property3 = k.next();
    String property3Name = NameHelper.uncapSafeName(property3);
    if ("name".equals(property3Name) || "code".equals(property3Name)) {
    stringBuffer.append(TEXT_41);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_42);
    stringBuffer.append(property2.getName());
    stringBuffer.append(TEXT_43);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_44);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_45);
    stringBuffer.append(NameHelper.getCapName(property2.getType()));
    stringBuffer.append(TEXT_46);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_47);
    }}
    }
    }
    for (Iterator<Property> j=ClassHelper.getAllManyToOneProperties(uml2Class); j.hasNext();) { Property property = j.next();
    for (Iterator<Property> k=ClassHelper.getAllSimpleProperties((org.eclipse.uml2.uml.Class)property.getType()); k.hasNext();) { Property property3 = k.next();
    String property3Name = NameHelper.uncapSafeName(property3);
    if ("name".equals(property3Name) || "code".equals(property3Name)) {
    stringBuffer.append(TEXT_48);
    stringBuffer.append(property.getName());
    stringBuffer.append(TEXT_49);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_50);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_51);
    stringBuffer.append(NameHelper.getCapName(property.getType()));
    stringBuffer.append(TEXT_52);
    stringBuffer.append(property3.getName());
    stringBuffer.append(TEXT_53);
    }
    }
    }
    stringBuffer.append(TEXT_54);
    for (Iterator<Property> i=ClassHelper.getAllSimpleProperties(uml2Class); i.hasNext();) { Property property = i.next();
    String propertyName = NameHelper.uncapSafeName(property);
    if (StereotypeHelper.isStereotypeApplied(property, StereotypeHelper.GENERATED_VALUE)) {
    stringBuffer.append(TEXT_55);
    stringBuffer.append(propertyName);
    stringBuffer.append(TEXT_56);
    stringBuffer.append(JsfHelper.getType(property));
    stringBuffer.append(TEXT_57);
    } else {
    stringBuffer.append(TEXT_58);
    stringBuffer.append(propertyName);
    stringBuffer.append(TEXT_59);
    stringBuffer.append(JsfHelper.getType(property));
    stringBuffer.append(TEXT_60);
    }}
    stringBuffer.append(TEXT_61);
    for (Iterator<Property> i=ClassHelper.getAllManyToOneProperties(uml2Class); i.hasNext();) { Property property = i.next();
    if ((property.getOpposite() == null || !property.getOpposite().isComposite())) {
    for (Iterator<Property> j=ClassHelper.getAllSimpleProperties((org.eclipse.uml2.uml.Class)property.getType()); j.hasNext();) { Property property2 = j.next();
    String propertyName = NameHelper.uncapSafeName(property);
    String property2Name = NameHelper.uncapSafeName(property2);
    if ("name".equals(property2Name) || "code".equals(property2Name)) {
    stringBuffer.append(TEXT_62);
    stringBuffer.append(propertyName);
    stringBuffer.append(TEXT_63);
    stringBuffer.append(property2Name);
    stringBuffer.append(TEXT_64);
    stringBuffer.append(JsfHelper.getType(property2));
    stringBuffer.append(TEXT_65);
    stringBuffer.append(property.getType().getName());
    stringBuffer.append(TEXT_66);
    }}
    for (Iterator<Property> k=ClassHelper.getAllManyToOneProperties((org.eclipse.uml2.uml.Class)property.getType()); k.hasNext();) { Property property2 = k.next();
    for (Iterator<Property> j=ClassHelper.getAllSimpleProperties((org.eclipse.uml2.uml.Class)property2.getType()); j.hasNext();) { Property property3 = j.next();
    String propertyName = NameHelper.uncapSafeName(property);
    String property2Name = NameHelper.uncapSafeName(property2);
    String property3Name = NameHelper.uncapSafeName(property3);
    if ("name".equals(property3Name) || "code".equals(property3Name)) {
    stringBuffer.append(TEXT_67);
    stringBuffer.append(propertyName);
    stringBuffer.append(TEXT_68);
    stringBuffer.append(property2Name);
    stringBuffer.append(TEXT_69);
    stringBuffer.append(property3Name);
    stringBuffer.append(TEXT_70);
    stringBuffer.append(JsfHelper.getType(property3));
    stringBuffer.append(TEXT_71);
    stringBuffer.append(property2.getType().getName());
    stringBuffer.append(TEXT_72);
    }}}}}
    stringBuffer.append(TEXT_73);
    if (ClassHelper.hasChildren(uml2Class)) {
    stringBuffer.append(TEXT_74);
    } else {
    stringBuffer.append(TEXT_75);
    }
    stringBuffer.append(TEXT_76);
    if (!ClassHelper.hasChildren(uml2Class)) {
    stringBuffer.append(TEXT_77);
    }
    boolean renderCharts = false;
    for (Iterator<Property> i=EnumerationHelper.getAllEnumerations(uml2Class); i.hasNext();) { Property property = i.next();
    importManager.addImport("rad.framework.seam.PieChart");
    renderCharts = true;
    stringBuffer.append(TEXT_78);
    stringBuffer.append(NameHelper.getCapName(property));
    stringBuffer.append(TEXT_79);
    stringBuffer.append(uml2Class.getName());
    stringBuffer.append(TEXT_80);
    stringBuffer.append(NameHelper.uncapName(property.getName()));
    stringBuffer.append(TEXT_81);
    }
    for (Iterator<Property> l=ClassHelper.getAllManyToOneProperties(uml2Class); l.hasNext();) { Property property = l.next();
    if (!ClassHelper.isComposite(property)) {
    importManager.addImport("rad.framework.seam.PieChart");
    renderCharts = true;
    stringBuffer.append(TEXT_82);
    stringBuffer.append(NameHelper.getCapName(property));
    stringBuffer.append(TEXT_83);
    if (!ClassHelper.hasNameProperty((org.eclipse.uml2.uml.Class)property.getType())) {
    stringBuffer.append(TEXT_84);
    }
    stringBuffer.append(TEXT_85);
    stringBuffer.append(uml2Class.getName());
    stringBuffer.append(TEXT_86);
    stringBuffer.append(NameHelper.uncapName(property.getName()));
    stringBuffer.append(TEXT_87);
    }}
    if (!renderCharts) {
    stringBuffer.append(TEXT_88);
    }
    stringBuffer.append(TEXT_89);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_90);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_91);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_92);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_93);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_94);
    if (!ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_95);
    }
    stringBuffer.append(TEXT_96);
    if (!ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_97);
    }
    stringBuffer.append(TEXT_98);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_99);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_100);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_101);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_102);
    stringBuffer.append(NameHelper.getCapName(uml2Class));
    stringBuffer.append(TEXT_103);
    if (!ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_104);
    }
    stringBuffer.append(TEXT_105);
    if (!ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_106);
    }
    stringBuffer.append(TEXT_107);
    if (!ClassHelper.hasNameProperty(uml2Class)) {
    stringBuffer.append(TEXT_108);
    }
    stringBuffer.append(TEXT_109);
    importStringBuffer.insert(importInsertionPoint, importManager.computeSortedImports());
    stringBuffer.append(TEXT_110);
    return stringBuffer.toString();
  }
}
